package com.paomi.client.activity.person.presenter;

import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter;
import com.hannesdorfmann.mosby3.mvp.MvpView;
import com.paomi.client.activity.person.View.SetNameView;
import com.paomi.client.bean.BaseJSON;
import com.paomi.client.net.Api;
import com.paomi.client.net.BaseCallback;
import com.paomi.client.net.Constants;

import java.util.Map;

import retrofit2.Call;

public class SetNamePre extends MvpBasePresenter<SetNameView> {
    /**
     * 设置用户信息
     */
    public void setUserInfo(Map<String, String> map) {
        //第一种网络请求方式
        Api.getInstanceService(Constants.User_URL).userInfo(map).enqueue(new BaseCallback<BaseJSON>() {
            @Override
            public void onResponse(Call<BaseJSON> call, BaseJSON result) {
                getView().showChangeUserInfo(result);
            }
        });
    }
}